<template>
  <div class="x_card line">
    <div class="x_card_title x_card_sticky">
      <div class="x_card_title_text">{{ title }}</div>
    </div>
    <div class="x_card_content">
      <slot name="content" />
    </div>
  </div>
</template>

<script>

export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  data() {
    return {

    }
  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>
.x_card{
  margin-bottom:20px;
    &_title{
      height:38px;
      padding:0 20px;
      background:#fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      &_text{
        font-size:14px;
        font-weight: 600;
         border-bottom:1px solid #000;
         padding:0 14px 5px 0px;
      }
    }
    &_sticky{
      position: sticky;
      top: 0;
      z-index: 2;
    }
    &_content{
      padding: 10px 20px;
      border: 1px solid #fff;
      overflow: hidden;
    }
  }
</style>
